<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ page errorPage="../errorPage.jsp" %>
<c:if test="${empty sessionScope.user}">
	<c:redirect url="../login.jsp" />
</c:if>
<c:if test="${sessionScope.user.getClass().name != 'accountManagement.Employee'}">
	<jsp:forward page="../errorPage.jsp">
		<jsp:param name="error" value="Access not permitted!" />
	</jsp:forward>
</c:if>
<!DOCTYPE html>
<html>
	<head>
		<meta charset="ISO-8859-1">
		<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/template.css">
		<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/header.css">
		<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/footer.css">
		<title>Crea una corsa</title>
	</head>
	<body>
		<div id="body">
			<%@ include file="../header.jsp" %>
			
			<%@ include file="../menu.jsp" %>
			
			<div id="title">
				Crea una corsa
			</div>
			
			<div id="content">
				<div>
					<form action="${pageContext.request.contextPath}/ServletCreateTransport" method="post">
						<div>
							<label>Id Corsa:</label>
							<input type="text" id="transportId" name="transportId">
						</div>
						<div>
							<label>Luogo Partenza:</label>
							<input type="text" id="origin" name="origin">
						</div>
						<div>
						<label>Luogo Arrivo:</label>
							<input type="text" id="destination" name="destination">
						</div>
						<div>
						<label>Data partenza:</label>
							<input type="text" id="departureDate" name="departureDate">
						</div>
						<div>
						<label>Data arrivo:</label>
							<input type="text" id="arrivalDate" name="arrivalDate">
						</div>
						<div>
						<label>Prezzo:</label>
							<input type="text" id="seatPrize" name="seatPrize">
						</div>
						<div>
							<input type="submit" value="Inserisci Corsa">
						</div>
					</form>
				</div>
			</div>
			
			<%@ include file="../footer.jsp" %>
		</div>
	</body>
</html>